import request from "@/utils/request";

// 获取空域申请列表
export function getAirApplyListApi(query, data) {
  return request({
    url: '/flight/apply/list',
    method: 'post',
    params: query,
    data
  })
}

// 查询空域申请详情
export function getApplyDetailApi(airspaceApplyId) {
  return request({
    url: `/flight/apply/${airspaceApplyId}`,
    method: 'get',
  })
}

// 新增空域申请
export function saveAirspaceApplyApi(query) {
  return request({
    url: '/flight/apply',
    method: 'post',
    data: query
  })
}

// 修改空域申请
export function editApplyApi(query) {
  return request({
    url: '/flight/apply',
    method: 'put',
    data: query
  })
}

// 审批空域申请
export function approvalApplyApi(query) {
  return request({
    url: '/flight/apply/approval',
    method: 'post',
    data: query
  })
}

// 删除空域申请
export function deleteApplyApi(airspaceApplyId) {
  // console.log(airspaceApplyId);
  return request({
    url: `/flight/apply/${airspaceApplyId}`,
    method: 'delete',
  })
}